<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta content="width=device-width, initial-scale=1.0" name="viewport">

  <title>Contact - Moderna Bootstrap Template</title>
  <meta content="" name="descriptison">
  <meta content="" name="keywords">

  <!-- Favicons -->
  <link href="../assets/img/favicon.png" rel="icon">
  <link href="../assets/img/apple-touch-icon.png" rel="apple-touch-icon">

  <!-- Google Fonts -->
  <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Roboto:300,300i,400,400i,500,500i,700,700i&display=swap" rel="stylesheet">

  <!-- Vendor CSS Files -->
  <link href="../assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
  <link href="../assets/vendor/animate.css/animate.min.css" rel="stylesheet">
  <link href="../assets/vendor/icofont/icofont.min.css" rel="stylesheet">
  <link href="../assets/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
  <link href="../assets/vendor/venobox/venobox.css" rel="stylesheet">
  <link href="../assets/vendor/owl.carousel/assets/owl.carousel.min.css" rel="stylesheet">
  <link href="../assets/vendor/aos/aos.css" rel="stylesheet">

  <!-- Template Main CSS File -->
  <link href="../assets/css/style.css" rel="stylesheet">
  <!-- 引入样式 -->
  <script src="../js/vue.js"></script>
  <link rel="stylesheet" href="../plugins/elementui/index.css">
  <link rel="stylesheet" href="../css/style.css">
  <!-- 引入组件库 -->
  <script type="text/javascript" src="../js/jquery.min.js"></script>
  <script src="../plugins/elementui/index.js"></script>
  <script src="../js/axios-0.18.0.js"></script>

</head>

<body>

<!-- ======= Header ======= -->
<header id="header" class="fixed-top ">
  <script src="../js/include.js"></script>
  <include src="header.html"></include>
</header><!-- End Header -->

<div id="app">
  <main id="main">
    <section class="contact" data-aos="fade-up" data-aos-easing="ease-in-out" data-aos-duration="500">
      <div class="container">

        <div class="row">

          <div class="col-lg-6">

            <div class="row">
              <div class="col-md-12">
                <div class="info-box">
                  <i class="bx bx-map"></i>
                  <h3>我们的地址</h3>
                  <p>巴布内亚新几内亚东西不列颠</p>
                </div>
              </div>
              <div class="col-md-6">
                <div class="info-box">
                  <i class="bx bx-envelope"></i>
                  <h3>我们的Email</h3>
                  <p>gfox@experience.com<br></p>
                </div>
              </div>
              <div class="col-md-6">
                <div class="info-box">
                  <i class="bx bx-phone-call"></i>
                  <h3>我们的电话</h3>
                  <p>123456789<br></p>
                </div>
              </div>
            </div>

          </div>

          <div class="col-lg-6">
            <form action="#" method="post" role="form" class="php-email-form">
              <div class="form-group">
                <input type="text" class="form-control" v-model="formData.username" name="subject" id="username" placeholder="用户名" data-rule="minlen:4" data-msg="Please enter at least 8 chars of subject" />
                <div class="validate"></div>
              </div>
              <div class="form-group">
                <input type="password" class="form-control" v-model="formData.password" name="subject" id="password" placeholder="密码" data-rule="minlen:4" data-msg="Please enter at least 8 chars of subject" />
                <div class="validate"></div>
              </div>
              <div class="form-group">
                <input type="text" class="form-control" v-model="formData.mail" name="subject" id="e_mail" placeholder="邮箱" data-rule="minlen:4" data-msg="Please enter at least 8 chars of subject" />
                <div class="validate"></div>
              </div>
              <div class="form-group">
                <input type="text" class="form-control" v-model="formData.phoneNumber" name="subject" id="phoneNumber" placeholder="电话" data-rule="minlen:4" data-msg="Please enter at least 8 chars of subject" />
                <div class="validate"></div>
              </div>
              <div class="text-center">
                <el-button  @click="login()" type="primary">登录</el-button>
                <el-button @click="register()" type="primary">注册</el-button>
              </div>
            </form>
          </div>

        </div>

      </div>
    </section><!-- End Contact Section -->



  </main><!-- End #main -->
</div>

<!-- ======= Footer ======= -->
<footer id="footer" data-aos="fade-up" data-aos-easing="ease-in-out" data-aos-duration="500">
  <script src="../js/include.js"></script>
  <include src="footer.html"></include>
</footer><!-- End Footer -->

<!-- Vendor JS Files -->
<script src="../assets/vendor/jquery/jquery.min.js"></script>
<script src="../assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="../assets/vendor/jquery.easing/jquery.easing.min.js"></script>
<script src="../assets/vendor/venobox/venobox.min.js"></script>
<script src="../assets/vendor/waypoints/jquery.waypoints.min.js"></script>
<script src="../assets/vendor/counterup/counterup.min.js"></script>
<script src="../assets/vendor/owl.carousel/owl.carousel.min.js"></script>
<script src="../assets/vendor/isotope-layout/isotope.pkgd.min.js"></script>
<script src="../assets/vendor/aos/aos.js"></script>

<!-- Template Main JS File -->
<script src="../assets/js/main.js"></script>

</body>

<script>
  new Vue({
      el:"#app",
      data:{
        formData:{

        }
      },
      methods:{
          register(){
            axios.post("/user/register",this.formData).then((res)=>{
                this.$message({
                    message:res.data.message,
                    type:res.data.type
                })
            })
          },
          login(){
              axios.post("/user/login",this.formData).then((res)=>{
                  this.$message({
                      message:res.data.message,
                      type:res.data.type
                  })
              })
          }
      }
  })
</script>
</html>